package EnviromentTest

import org.apache.flink.api.scala.ExecutionEnvironment
import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment

class Enviroment01 {
  def main(args: Array[String]): Unit = {

    //方式 getExecutionEnviroment
//    val env: ExecutionEnvironment = ExecutionEnvironment.getExecutionEnvironment
//    val env: StreamExecutionEnvironment = StreamExecutionEnvironment.getExecutionEnvironment

    //方式 createLocalEnvironment
//    val env: StreamExecutionEnvironment = StreamExecutionEnvironment.createLocalEnvironment(1)

    //方式 createRemoteEnvironment
    // 返回集群执行环境，将 Jar 提交到远程服务器。需要在调用时指定 JobManager 的 IP 和端口号，并指定要在集群中运行的 Jar
    val env: ExecutionEnvironment = ExecutionEnvironment.createRemoteEnvironment("jobmanage-hostname", 6123, "path//xxx.jar")

  }

}
